from common.unit import AndroidUI


# 回收界面,科室装箱，箱列表
class RecoverBoxListObject:

    def __init__(self):
        self.driver = AndroidUI.get_webdriver()

    # 标题信息，当前已装1箱
    def title_name(self):
        element = self.driver.find_element_by_id("com.bluephone:id/boxtitle")
        return element

    # 删除按钮，从左到右，往下分别为：11,12,21,22,31,32
    def delete_button(self, n):
        element = self.driver.find_element_by_id(f"com.bluephone:id/delbox{n}")
        return element

    #删除操作的二次确认的删除按钮
    def delete_ok(self):
        element = self.driver.find_element_by_id("com.bluephone:id/prompt_right_btn")
        return element

    #删除操作的二次确认的取消按钮
    def delete_cancle(self):
        element = self.driver.find_element_by_id("com.bluephone:id/prompt_left_btn")
        return element

    # 出码按钮，从左到右，往下分别为：11,12,21,22,31,32
    def outbox_button(self, n):
        element = self.driver.find_element_by_id(f"com.bluephone:id/outbox{n}")
        return element

    # 箱信息，从左到右，往下分别为：11,12,21,22,31,32
    def box_msg(self, n):
        element = self.driver.find_element_by_id(f"com.bluephone:id/box{n}")
        return element

    def back_button(self):
        element = self.driver.find_element_by_id("com.bluephone:id/iv_back")
        return element
